#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include<QPainter>
#include<windows.h>
#include <QKeyEvent>
//#include<QDragEnterEvent>
//#include<QDragLeaveEvent>
//#include<QDropEvent>
namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT
    
public:
    QPixmap pic;
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    void paintEvent(QPaintEvent *);
    void keyPressEvent(QKeyEvent * e);
    void mousePressEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);
    void mouseReleaseEvent(QMouseEvent *event);
    void wheelEvent(QWheelEvent *event);
    void mydialog();
    void mouseDoubleClickEvent(QMouseEvent * event);
    void write_to_clickboard(char* str);
    QString get_name(int kind);
    //bool MainWindow::winEventFilter(MSG *message, long *result);
    //bool winEvent(MSG* pMsg);
    bool KEY_PRESSED,MOUSE_PRESSED,MOUSE_MOVE,MOUSE_RELEASED,MOUSE_SHIFT,BUFFER_FULL,WHEEL_PRESSED,RIGHT_PRESSED,FILE_DRAGGED;
    bool CTRL_ROOLUP,CTRL_ROOLDOWN,MOUSE_DOUBLECLICK,FULL,TO_GET_FILENAME;
    int KEY_NUM,MOUSE_X,MOUSE_Y,ROOL_NUM,WINDOW_X,WINDOW_Y,GLOBAL_X,GLOBAL_Y,filekind;
    char string[1024]={0};
    char file[1024]={0};
    char* board;
    QPainter * painter;
    QString filename;
private:
    Ui::MainWindow *ui;
    bool WINDOW_DRAGGED;
protected:
    //bool winEventFilter(MSG *message,long * result);
    bool nativeEvent(const QByteArray & eventType, void * message, long * result);
    void dragEnterEvent(QDragEnterEvent *event);
    void dropEvent(QDropEvent *event);
public slots:
    void slot1(QString q);
};

#endif // MAINWINDOW_H
